package service.Impl;

import dao.Impl.UserDaoImpl;
import dao.UserDao;
import entity.User;
import service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao=new UserDaoImpl();
    @Override
    public int register(String account, String nickName, String password, int genter, String idCardNo,String email, String phone) {
        return userDao.register(account,nickName,password,genter,idCardNo,email,phone);
    }

    @Override
    public boolean login(String Nickname, String password) {
        List<User> loginList=userDao.login(Nickname,password);
        if (loginList.size()==0){
            return false;

        }else {
            return true;

        }
    }
}
